package com.qingcloud.adminbackend.mapper;

import com.qingcloud.adminbackend.entity.upgrade.UpgradeSpecialDTO;
import com.qingcloud.adminbackend.entity.upgrade.UpgradeSpecialRequest;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ITdUpgradeSpecialMapper {

    List<UpgradeSpecialDTO> search(@Param("upgradeSpecial") UpgradeSpecialRequest upgradeSpecial, @Param("offset") Long offset,
                                   @Param("pageSize") Integer pageSize);

    Integer save(UpgradeSpecialDTO upgradeSpecial);

    Integer saveAll(@Param("upgradeSpecialDTOList") Iterable<UpgradeSpecialDTO> upgradeSpecialDTOList);

    Integer update(UpgradeSpecialDTO upgradeSpecial);

    Integer deleteByIdList(List<String> ids);

    Integer deleteByEqId(@Param("equipmentId") String equipmentId);

    Integer deleteByEqIds(@Param("equipmentIds") String equipmentIds);

    List<UpgradeSpecialDTO> findByEqId(@Param("equipmentId") String equipmentId);

    Integer existEqId(@Param("equipmentId") String equipmentId);

    Integer count(@Param("upgradeSpecial") UpgradeSpecialRequest upgradeSpecial);

    UpgradeSpecialDTO findUpgradeSpecialById(@Param("id") String id);

    String findCurrentVersionByEquipmentId(@Param("equipmentId") String equipmentId);

    String findMaxBatchNum();

    Integer existStationId(@Param("stationId") String stationId);

    Integer existEquipmentId(@Param("equipmentId") String equipmentId);
}
